﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;


namespace SudoCalc
{
    class DataReader
    {
        string path = @"D:\Code\Sudo\SudoData.json";
        public string ReadData()
        {
            string CellData;
            FileStream fs = new FileStream(path, FileMode.Open);
            byte[] b = new byte[fs.Length];
            fs.Read(b, 0, b.Length);
            CellData = Encoding.Default.GetString(b);
            fs.Close();
            return CellData;
        }
     
    }
    /*   public void Deserialization()
        {
            ReadData read = new ReadData();
            string celldata = ReadData.CellData;
            public static  Cell cells DeserializeObject<cells>(this.CellData);
        }*/
    /* List<Cell> cells = new List<Cell>();
     DataReader data = new DataReader();
     string a = data.ReadData( );*/

    /* 
     *public static T DeserializeObject<T：反序列化的产物>(string value:传来的json)
     */
}
